const express = require('express')
const router = express.Router()
const auth = require('@/middleware/auth.middleware')
const visitController = require('@/controllers/visit.controller')

/**
 * c端接口访问记录查询
 * @route GET /visit
 * @summary c端接口访问记录查询
 * @group 访问记录
 * @param {string} pageNo.query.required
 * @param {string} pageSize.query.required
 * @param {string} ip.query
 * @param {string} path.query
 * @param {string} startTime.query
 * @param {string} endTime.query
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 * @access visit-from-c-permission:menu
 * @security JWT
 */
router.get('/', auth(), visitController.findPage)

module.exports = router
